# 搜索页面
from selenium.webdriver.common.by import By

from web_po.package.basedriver import BaseDriver


class SearchPackage(BaseDriver):
    def input_keyword(self, content):
        # 输入关键词
        self.find_content(By.CSS_SELECTOR, ".search-bar .full-page-search", content)
        self.find_and_click(By.XPATH, "//*[text()='搜索']")
        return self


    def get_search_result(self):
        # 搜索到的结果
        eles = self.finds(By.CLASS_NAME, "topic-title")
        return eles

